<form id="pagerForm" method="post" action="">
	<input type="hidden" name="pageNum" value="{$pageNum}" />
	<input type="hidden" name="numPerPage" value="{$numPerPage}" />
	<input type="hidden" name="orderField" value="{$orderField}" />
	<input type="hidden" name="orderDirection" value="{$orderDirection}" />
	<input type="hidden" name="keywords" value="{$keywords}" />
	<input type="hidden" name="sfield" value="{$sfield}" />
	<input type="hidden" name="dids" value="{$dids}" />
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="" method="post">
		<input type="hidden" name="m" value="{$module_name}" />
		<input type="hidden" name="a" value="{$action_name}" />
	<div class="searchBar">
		<ul class="searchContent">
			<li style="width:210px;">
				<label style="width:60px;">关键字：</label>
				<input type="text" class="autoinput" name="keywords" value="{$keywords}" style="width:120px;"/>
			</li>
			<li style="width:60px;">
			<select name="sfield" class="combox">
				<option value="all" {if $sfied=='all'}selected="selected"{/if}>全部</option>
				<option value="name" {if $sfied=='name'}selected="selected"{/if}>公司名</option>
				<option value="telephone" {if $sfied=='telephone'}selected="selected"{/if}>电话</option>
				<option value="id" {if $sfied=='id'}selected="selected"{/if}>ID</option>
				<option value="contact" {if $sfied=='contact'}selected="selected"{/if}>联系人</option>
				<option value="address" {if $sfied=='address'}selected="selected"{/if}>地址</option>
			</select>
			<input type="hidden" name="sfield_name" value="id,name,telephone,contact,address" />
			</li>
			<div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
			<div class="buttonActive"><div class="buttonContent"><button type="button" onclick="navTab.reload();">刷新 </button></div></div>
		</ul>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a title="确实要设定这些供应商参与竞价吗?" target="selectedTodo" targetType="dialog" rel="sids[]" href="{:U($module_name.'/do_setsuppliers',array('dids'=>$dids))}" class="icon"><span>批量设定</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="98">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="sids[]" class="checkboxCtrl">编号</th>
				<th width="120" orderField="id" {if $orderField=='id'}class="{$orderDirection}"{/if}>公司名</th>
				<th width="120" orderField="name" {if $orderField=='name'}class="{$orderDirection}"{/if}>公司名</th>
				<th width="120" orderField="telephone" {if $orderField=='telephone'}class="{$orderDirection}"{/if}>电话</th>
				<th width="120" orderField="contact" {if $orderField=='contact'}class="{$orderDirection}"{/if}>联系人</th>
				<th width="200" orderField="address" {if $orderField=='address'}class="{$orderDirection}"{/if}>地址</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody >
<volist name="list" id="data">
			<tr target="sid_dv" rel="{$data['id']}">
				<td><input name="sids[]" value="{$data['id']}" type="checkbox">{$data['id']}</td>
				<td>{$data['id']}</td>
				<td>{$data['name']}</td>
				<td>{$data['telephone']}</td>
				<td>{$data['contact']}</td>
				<td>{$data['address']}</td>
				<td>
{if !in_array($data['id'],$suppliers)}
					<a class="btnAdd" target="ajaxTodo" callback="do_setsuppliers" href="{:U($module_name.'/do_setsuppliers',array('dids'=>$dids,'sid'=>$data['id']))}">设定</a>
{else}
					<a class="btnSelect" href="javascript:;" title="{$status[$selsid[$data['id']]['status']]}">{$status[$selsid[$data['id']]['status']]}</a>
{/if}
				</td>
			</tr>
</volist>
		</tbody>
	</table>
<!--include file="Index:pages" /-->
</div>
<script>
	function do_setsuppliers(json){
		DWZ.ajaxDone(json);
		if (json.statusCode == DWZ.statusCode.ok){
			$.pdialog.reload(json.forwardUrl,{dialogId:json.dialogId});
		}
	}
</script>